<?php
/* @var $this CategoryController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'分类',
);

$this->menu=array(
	array('label'=>'创建分类', 'url'=>array('create')),
	array('label'=>'管理分类', 'url'=>array('admin')),
);
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('category/index')?>">分类</a></li>
        <li class="active">分类列表</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search1">

    </div>
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>分类
            <small><i class="ace-icon fa fa-angle-double-right"></i> Category</small>
            <small>
                <a href="<?=$this->createUrl('category/create')?>" class="btn btn-xs"><i class="fa fa-plus"></i> 创建</a>
                <a href="<?=$this->createUrl('category/delete')?>" class="btn btn-xs" title="删除" data-pjax="0" data-confirm="真的要删除吗？"><i class="fa fa-trash-o"></i> 删除</a>
            </small>
        </h1>

    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <div class="row">
                <div class="col-xs-12">
                    <table id="simple-table" class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th class="center" width="20"><label class="pos-rel"><input type="checkbox" class="ace" name="selection_all" id="selection_all" /><span class="lbl"></span></label></th>
                            <th width="100">ID</th>
                            <th width="100" class="text-center">排序</th>
                            <th width="">名称</th>
                            <th width="">别名</th>
                            <th width="80" class="text-center">模型</th>
                            <th width="80" class="text-center">分页</th>
                            <th width="150" class="text-center">分类模板</th>
                            <th width="150" class="text-center">内容模板</th>
                            <th width="60">缩微图</th>
                            <th width="50" class="text-center">显示</th>
                            <th width="125"><i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>创建时间</th>
                            <th width="125"><i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>更新时间</th>
                            <th width="102">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php foreach ($list as $key=>$data){?>
                            <tr>
                                <td class="center"><label class="pos-rel"><input type="checkbox" class="ace" name="selection[]" value="<?=$data['id']?>"/><span class="lbl"></span></label></td>
                                <td><?php echo CHtml::encode($data['id']); ?></td>
                                <td><?=$data['str_repeat'];?>├ <?php echo CHtml::encode($data['sort']); ?></td>
                                <td><?=$data['str_repeat'];?>├ <?php echo CHtml::encode($data['name']); ?></td>
                                <td><?php echo CHtml::encode($data['alias']); ?></td>
                                <td class="text-center"><?php echo Constants::getCategoryTypeItems($data['type']); ?></td>
                                <td class="text-center"><?php echo CHtml::encode($data['page_size']); ?></td>
                                <td class="text-center"><?php echo CHtml::encode($data['template']); ?></td>
                                <td class="text-center"><?php echo CHtml::encode($data['article_template']); ?></td>
                                <td class="text-center"><?php if($data['thumb']):?><a class="thumbImg" href="<?=CHtml::encode($data['thumb']);?>" img="<?=CHtml::encode($data['thumb']);?>" target="_blank" data-pjax="0">是</a><?php else:?>否<?php endif?></td>
                                <td><span class="label <?php if($data['status']==1){echo'label-success';}else{echo'label-danger';}?>"><?php echo Constants::getYesNoItems($data['status']); ?></span></td>
                                <td><?php echo date('Y-m-d H:i',$data['created_at']); ?></td>
                                <td><?php echo date('Y-m-d H:i',$data['updated_at']); ?></td>
                                <td>
                                    <div class="hidden-sm hidden-xs btn-group">
                                        <a href="<?=$this->createUrl('view',array('id'=>$data['id']))?>" title="查看" class="btn btn-xs btn-success"><i class="ace-icon fa fa-eye bigger-120"></i></a>
                                        <a href="<?=$this->createUrl('update',array('id'=>$data['id']))?>" title="编辑" class="btn btn-xs btn-info"><i class="ace-icon fa fa-pencil bigger-120"></i></a>
                                        <a href="<?=$this->createUrl('delete',array('id'=>$data['id']))?>" title="删除" class="btn btn-xs btn-danger"><i class="ace-icon fa fa-trash-o bigger-120"></i></a>
                                    </div>
                                </td>
                            </tr>
                        <?php }?>
                        </tbody>
                    </table>
                    <div class="pagination-xs">

                    </div>
                </div><!-- /.span -->
            </div><!-- /.row -->
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->
